import 'package:json_annotation/json_annotation.dart';
import 'package:juming_test/model/home/home_kingkong_model.dart';

part 'kingkong_management_section_model.g.dart';

@JsonSerializable(explicitToJson: true, includeIfNull: false)
class KingkongManagementSectionModel {
  KingkongManagementSectionModel(this.id, this.sort, this.title, this.items);

  @JsonKey(defaultValue: 0)
  int id;
  @JsonKey(defaultValue: 0)
  int sort;
  @JsonKey(defaultValue: '')
  String title;
  @JsonKey(defaultValue: [])
  List<HomeKingkongModel> items;

  factory KingkongManagementSectionModel.fromJson(Map<String, dynamic> json) =>
      _$KingkongManagementSectionModelFromJson(json);
  Map<String, dynamic> toJson() => _$KingkongManagementSectionModelToJson(this);
}
